package com.oig.sys.auth.dao;

import com.oig.sys.auth.entity.TbTenantInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface ITbTenantInfoDao extends JpaRepository<TbTenantInfo,Integer> {

    TbTenantInfo getTbTenantInfoById(Integer id);

    TbTenantInfo getTbTenantInfoByCode(String code);

    @Query("select c from TbTenantInfo c where c.status='04'")
    List<TbTenantInfo> findOkAll();

    @Query("select c from TbTenantInfo c where c.id in(:idList) and c.status='04'")
    List<TbTenantInfo> findOkAllById(@Param("idList") List<Integer> orgzIdList);



}
